package lx.springBoot.activeMq;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Component;

import javax.jms.Queue;
import javax.jms.Topic;

/**
 * Created by lx on 2017/7/10.
 */
@Component
public class Producer {

    @Autowired
    private Topic topic;
    @Autowired
    private Queue queue;
    @Autowired
    private JmsMessagingTemplate jmsMessagingTemplate;

    public void sendTopic(String mes){
        jmsMessagingTemplate.convertAndSend(ActiveMqConfig.TOPIC,mes);
    }
}
